import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('../views/home/index.vue'),
    },
    {
      path: '/exampleMap',
      name: 'exampleMap',
      component: () => import('../views/exampleMap/index.vue')
    },
    {
      path: '/exampleModal',
      name: 'exampleModal',
      component: () => import('../views/exampleModal/index.vue')
    },
    {
      path: '/exampleForm',
      name: 'exampleForm',
      component: () => import('../views/exampleForm/index.vue')
    },
    {
      path: '/exampleScrollList',
      name: 'exampleScrollList',
      component: () => import('../views/exampleScrollList/index.vue')
    },
    {
      path: '/exampleAnchorTab',
      name: 'exampleAnchorTab',
      component: () => import('../views/exampleAnchorTab/index.vue')
    },
    {
      path: '/exampleTableList',
      name: 'exampleTableList',
      component: () => import('../views/exampleTableList/index.vue')
    },
    {
      path: '/exampleOlMap',
      name: 'exampleOlMap',
      component: () => import('../views/exampleOlMap/index.vue')
    },
    {
      path: '/exampleEChart',
      name: 'exampleEChart',
      component: () => import('../views/exampleEChart/index.vue')
    },
    {
      path: '/basicSearchTablePage',
      name: 'basicSearchTablePage',
      redirect: '/basicSearchTablePage/list',
      children: [
        {
          path: '/basicSearchTablePage/list',
          name: 'basicSearchTablePage/list',
          component: () => import('../views/basicSearchTablePage/list/index.vue')
        },
        {
          path: '/basicSearchTablePage/operatePage',
          name: 'basicSearchTablePage/operatePage',
          component: () => import('../views/basicSearchTablePage/operatePage/index.vue')
        }
      ]
    },
    {
      path: '/test3dMap',
      name: 'test3dMap',
      component: () => import('../views/test3dMap/index.vue')
    },
  ]
})

export default router
